<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript">
			function aaa(shang,yu){
				if(shang<16){
					return shang+yu;
				}else{
					yu += shang%16;
//					shang = parseInt(shang/16);
					return aaa(parseInt(shang/16), yu);
				}
			}
			window.onload = function(){
				var btn = document.getElementById('btn');
				btn.onclick = function(){
					var t1 = document.getElementById('t1');
				t1 = parseInt(t1.value);
				alert(aaa(t1,''));
				}
				
			}
		</script>
	</head>
	<body>
		<input type="text" id="t1" value="" />
		<input type="button" id="btn" value="" />
		<input type="text" id="t2" value="" />
	</body>
</html>
